package com.zls;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest(classes = RedisApp.class)
@RunWith(SpringRunner.class)
public class test1 {
    @Autowired
    private RedisTemplate myRedisTemplate ;
    @Test
    public void demo01(){
        myRedisTemplate.opsForValue().set("myredistem","hello");
        String tem = (String) myRedisTemplate.opsForValue().get("myredistem");
        System.out.println(tem);
    }

}
